<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<title>更新快递公司</title>
<script type="text/javascript">
	//图片上传的初始化
	$('#uploadify').uploadify({
		'uploader' : 'uploadify/scripts/uploadify.swf',
		'script' : 'picUploadify', //指定服务端处理类的入口
		'folder' : 'upload/image',
		'cancelImg' : 'uploadify/cancel.png',
		'fileDataName' : 'uploadify', //和input的name属性值保持一致就好，Struts2就能处理了   
		'queueID' : 'fileQueue',
		'auto' : true,//是否选取文件后自动上传   
		'multi' : false,//是否支持多文件上传
		'simUploadLimit' : 1,//每次最大上传文件数   
		'fileDesc' : '.jpg文件或.gif文件或.png文件',//上传文件类型说明
		'fileExt' : '*.jpg;*.gif;*.png',
		'wmode' : 'transparent', //隐藏进度条
		'displayData' : 'percentage',//有speed和percentage两种，一个显示速度，一个显示完成百分比    
		'onComplete' : function(event, queueID, fileObj, response, data) {
			$("#picPath").val(response);
			$("#imgpath").html("<img src='"+response+"' />");
		}
	});

	//图片上传的初始化
	$('#uploadify2').uploadify({
		'uploader' : 'uploadify/scripts/uploadify.swf',
		'script' : 'picUploadify', //指定服务端处理类的入口
		'folder' : 'upload/image',
		'cancelImg' : 'uploadify/cancel.png',
		'fileDataName' : 'uploadify', //和input的name属性值保持一致就好，Struts2就能处理了   
		'queueID' : 'fileQueue',
		'auto' : true,//是否选取文件后自动上传   
		'multi' : false,//是否支持多文件上传
		'simUploadLimit' : 1,//每次最大上传文件数   
		'fileDesc' : '.jpg文件或.gif文件或.png文件',//上传文件类型说明
		'fileExt' : '*.jpg;*.gif;*.png',
		'wmode' : 'transparent', //隐藏进度条
		'displayData' : 'percentage',//有speed和percentage两种，一个显示速度，一个显示完成百分比    
		'onComplete' : function(event, queueID, fileObj, response, data) {
			$("#picPath2").val(response);
			$("#imgpath2").html("<img src='"+response+"' />");
		}
	});
	
	//图片上传的初始化
	$('#uploadify3').uploadify({
		'uploader' : 'uploadify/scripts/uploadify.swf',
		'script' : 'picUploadify', //指定服务端处理类的入口
		'folder' : 'upload/image',
		'cancelImg' : 'uploadify/cancel.png',
		'fileDataName' : 'uploadify', //和input的name属性值保持一致就好，Struts2就能处理了   
		'queueID' : 'fileQueue',
		'auto' : true,//是否选取文件后自动上传   
		'multi' : false,//是否支持多文件上传
		'simUploadLimit' : 1,//每次最大上传文件数   
		'fileDesc' : '.jpg文件或.gif文件或.png文件',//上传文件类型说明
		'fileExt' : '*.jpg;*.gif;*.png',
		'wmode' : 'transparent', //隐藏进度条
		'displayData' : 'percentage',//有speed和percentage两种，一个显示速度，一个显示完成百分比    
		'onComplete' : function(event, queueID, fileObj, response, data) {
			$("#picPath3").val(response);
			$("#imgpath3").html("<img src='"+response+"' />");
		}
	});
</script>
</head>
<body>
	<div class="pageContent">
		<form class="pageForm required-validate" method="post" action="updateExpressCompanyAction.action" onsubmit="return validateCallback(this, navTabAjaxDone);">
			<input type="hidden" name="rightId" value="${rightId}" /> <input name="id" value="<s:property value='#request.expressCompany.id' />" type="hidden" />
			<div class="pageFormContent" layoutH="56">
				<table>
					<tr>
						<td>公司名称</td>
						<td><input disabled="disabled" name="name" type="text" size="30" value="<s:property value='#request.expressCompany.name'/>"  /></td>
					</tr>
					<%-- <tr>
						<td>唯一编码：</td>
						<td><input disabled="disabled" name="code" type="text" size="30" value="<s:property value='#request.expressCompany.code'/>"  /></td>
					</tr> --%>
					<tr>
						<td>公司别名：</td>
						<td><input name="alias" type="text" size="30" value="<s:property value='#request.expressCompany.alias'/>" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>联系电话：</td>
						<td><input name="telephone" type="text" size="30" value="<s:property value='#request.expressCompany.telephone'/>" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>取件时间：</td>
						<td><input name="getTime" type="text" size="30" value="<s:property value='#request.expressCompany.getTime'/>" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>描述：</td>
						<td><input name="description" type="text" size="30" value="<s:property value='#request.expressCompany.description'/>" class="required textInput valid" /></td>
					</tr>
					<tr>
						<td>是否可用：</td>
						<td><s:if test="#request.expressCompany.enabled==0">
								<select   name="enabled" style="width: 120px">
									<option value="1">可用</option>
									<option value="0" selected="selected">禁用</option>
								</select>
							</s:if> <s:elseif test="#request.expressCompany.enabled==1">
								<select   name="enabled" style="width: 120px">
									<option value="1" selected="selected">可用</option>
									<option value="0">禁用</option>
								</select>
							</s:elseif></td>
					</tr>
					<tr>
					<td>显示顺序：</td>
						<td><input name="displaySequence" type="text" onkeyup="value=value.replace(/[^\d.]/g,'')" value="<s:property value='#request.expressCompany.displaySequence'/>" size="30" class="required textInput valid" /></td>
					</tr>
					
					<tr>
						<td>是否显示：</td>
						<td><s:if test="#request.expressCompany.isDisplay==0">
								<select   name="isDisplay" style="width: 120px">
									<option value="1">显示</option>
									<option value="0" selected="selected">不显示</option>
								</select>
							</s:if> <s:elseif test="#request.expressCompany.isDisplay==1">
								<select   name="isDisplay" style="width: 120px">
									<option value="1" selected="selected">显示</option>
									<option value="0">不显示</option>
								</select>
							</s:elseif></td>
					</tr>
					
					
					<tr>
						<td>WEB-LOGO：</td>
						<td><input type="file" name="uploadify" id="uploadify" /> <input id="picPath" type="hidden" name="logUrl" class="required" value="<s:property value='#request.expressCompany.logUrl'/>" />
					</tr>
					<tr>
						<td colspan="2">
							<div id="imgpath">
								<img src="<s:property value='#request.expressCompany.logUrl'/>">
							</div>
						</td>
					</tr>
					<tr>
						<td>微信-LOGO：</td>
						<td><input type="file" name="uploadify" id="uploadify2" /> <input id="picPath2" type="hidden" name="wxUrl" class="required" value="<s:property value='#request.expressCompany.wxUrl'/>" />
					</tr>
					<tr>
						<td colspan="2">
							<div id="imgpath2">
								<img src="<s:property value='#request.expressCompany.wxUrl'/>">
							</div>
						</td>
					</tr>
					<tr>
						<td>APP-LOGO：</td>
						<td><input type="file" name="uploadify" id="uploadify3" /> <input id="picPath3" type="hidden" name="applogoUrl" class="required" value="<s:property value='#request.expressCompany.applogoUrl'/>" />
					</tr>
					<tr>
						<td colspan="2">
							<div id="imgpath3">
								<img src="<s:property value='#request.expressCompany.applogoUrl'/>">
							</div>
						</td>
					</tr>
				</table>
						</div>
				<div class="formBar">
					<ul>
						<li>
							<div class="buttonActive">
								<div class="buttonContent">
									<button type="submit">保存</button>
								</div>
							</div>
						</li>
						<li>
							<div class="button">
								<div class="buttonContent">
									<button type="button" class="close">取消</button>
								</div>
							</div>
						</li>
					</ul>
				</div>
		</form>
	</div>
</body>
</html>
